<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
//     1.写一个函数 getQueryString,传入一个url地址和一个key,返回key对应的参数值
// var url = 'https://wenku.baidu.com/0ea73.html?wkts=16784&query=email';
// getQueryString(url,'query') => 'email'
// getQueryString(url,'wkts') => '16784'

var url = 'https://wenku.baidu.com/0ea73.html?wkts=16784&query=email';
var reg = /\w{5,7}:\/\w{5,7}\.\w{5,7}.\.{5,7}\/\d[a-zA-z]{2,5}\d+ ?(\w{2,7} =\d+)&(\w{2,7})=\w{2,7}/
console.log(reg.test(url));

</script>
</body>
</html>